Skip to content

fix(node-client-sdk): adding docs to clarify FDv2 datasystem will ignore initialConnectionMode - #1835

Open
joker23 wants to merge 1 commit into
mainfrom
skz/sdk-2829/honor-initial-offline-mode
Open

fix(node-client-sdk): adding docs to clarify FDv2 datasystem will ignore initialConnectionMode#1835
joker23 wants to merge 1 commit into
mainfrom
skz/sdk-2829/honor-initial-offline-mode

Conversation

@joker23

@joker23 joker23 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

This PR will add clarification to the behavior when datasystems (FDv2) AND is set along with initialConnectionMode is set to offline. In this case, FDv2 datasystems will win out and the initialConnectionMode will be ignore. This behavior is consistent with flutter client sdk.

The additional thing I added here is a warning log for when these configurations are set together so users will know what to expect


Note

Low Risk
Diagnostic logging and documentation only; connection mode behavior on the FDv2 path is unchanged aside from making misconfiguration visible.

Overview
Clarifies that initialConnectionMode is an FDv1-only option: when a real dataSystem object is configured, FDv2 owns startup connection mode and the top-level option has no effect (aligned with other client SDKs).

validateOptions now logs a warning if both dataSystem and an explicit initialConnectionMode are set, and points callers to dataSystem.automaticModeSwitching.initialConnectionMode with type: 'manual'. Warnings are skipped for null/invalid dataSystem, null initialConnectionMode, or when only one of the two is provided.

NodeOptions JSDoc documents the same precedence. Tests cover option validation edge cases and that createClient still resolves FDv2 mode (e.g. streaming) while emitting the warning when both options are set.

Reviewed by Cursor Bugbot for commit 899c4c0. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26360 bytes
Compressed size limit: 29000
Uncompressed size: 129188 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179691 bytes
Compressed size limit: 200000
Uncompressed size: 831704 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 39108 bytes
Compressed size limit: 39300
Uncompressed size: 213642 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 32077 bytes
Compressed size limit: 34000
Uncompressed size: 114525 bytes

@joker23

joker23 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 899c4c0. Configure here.

@joker23
joker23 marked this pull request as ready for review July 31, 2026 18:09
@joker23
joker23 requested a review from a team as a code owner July 31, 2026 18:09

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant